<!--{template common/header_simple_start}-->
<script type="text/javascript" src="$onlyDocumentUrl"></script>
<!--{template common/header_simple_end}-->
<style>
html,body{
	height:100%;
	overflow:hidden;
}
</style>
<div id="placeholder" style="width:100%;height:100%;overflow:auto"></div>

<script type="text/javascript">
config = {
    "documentType": "$documentType",
	"type":<!--{if helper_browser::ismobile()}-->"mobile"<!--{else}-->"desktop"<!--{/if}-->,
    "document": {
        "fileType": "$meta[ext]",
        "key": "$key",
        "title": "$meta[title]",
        "url": "$stream",
		"permissions": {
			"reader":true,
			"download": <!--{if $perm_download}-->true<!--{else}-->false<!--{/if}--> ,
			"edit": <!--{if $perm_edit}-->true<!--{else}-->false<!--{/if}--> ,
			"print":  <!--{if $perm_print}-->true<!--{else}-->false<!--{/if}-->,
			"review":"edit",
			"rename":true,
			"changeHistory":false
        }
    },
    "editorConfig": {
		"mode":"$mode",
		"canAutosave":true,
		"canCoAuthoring":true,
        "callbackUrl": "$saveurl",
		"createUrl":'',
		"lang": "zh-CN",
		"location":"zh-CN",
		"user": {
				id:'$_G[uid]',
				firstname:'$_G[username]',
				name:'$_G[username]'
			}
	   ,"customization": {
			"chat":true,
			"comments":true,
			"goback":false,
			"compactToolbar":true,
			"about": false,
			"leftMenu": true,
			"rightMenu": true,
			"toolbar": true,
            "header": false,
            "autosave": true			
		}
    },
	"events": {
			'onReady': function(){},
			'onBack': function(){},
			'onError': function(){},
			'onSave': function(){}
		}
};
jQuery(document).ready(function(){
var docEditor = new DocsAPI.DocEditor("placeholder", config);
});
</script>
<!--{template common/footer_simple}-->